﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace Core
{
    public static partial class system
    {
        public static dynamic getLangList(bool all)
        {
            var sql = new Sql.SqlDataContext();
            var ls = from l in sql.Language
                     where all || !l.disabled
                     select new
                     {
                         l.title,
                         l.code
                     };
            var result = ls.ToList<dynamic>();
            result.Insert(0, new
            {
                title = "　",
                code = (object)null,
            });
            return new
            {
                success = true,
                result
            };
        }
    }
}
